RC Document OCR API
Objective
The RC Document OCR API extracts information from a Registration Certificate (RC) document image.
| Input | Output |
|---|---|
| An image of the user's RC Document | The textual information extracted from the document. The complete list of output fields is provided under the Success Response Details section |
API Endpoint
https://ind-engine.thomas.hyperverge.co/v1/readRC
API Endpoint
readRC
Overview
The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Authentication
You need a unique pair of application ID (appId) and application key (appKey) from HyperVerge to verify your identity for accessing the API.
API Request Details
Method - POST
Headers
| Parameter | Mandatory or Optional | Description | Allowed Values |
|---|---|---|---|
| content-type | Mandatory | This parameter defines the media type for the request payload | application/json |
| appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value. |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value. |
| transactionId | Mandatory | A unique identifier for tracking a user journey | This should be both unique and easily associated with the user's journey in your application(s) |
Input
The following table provides the complete information on the parameter used in the request body for the API calls.
| Parameter | Description | Mandatory or Optional | Allowed Values | Default Value |
|---|---|---|---|---|
image | The image file for OCR extraction | Mandatory | The file can be of JPG, JPEG or PNG format | Not Applicable |
Sample Request
The following code shows a standard cURL request for the API.
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/readRC' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--form 'image=@"<Enter_image_path_with_extension>"'
Success Response Sample
- OCR on RC Documents
- OCR on Other Documents
{
"status": "success",
"statusCode": "200",
"result": [
{
"details": {
"type": "ind_rc",
"registrationNumber": {
"value": "<Extracted_Registration_Number>",
"conf": "<Confidence_Level>"
},
"registrationDate": {
"value": "<Registration_Date_in_DD-MM-YYYY_Format>",
"conf": "<Confidence_Level>"
},
"registrationExpiryDate": {
"value": "<Registration_Expiry_Date_in_DD-MM-YYYY_Format>",
"conf": "<Confidence_Level>"
},
"chassisNumber": {
"value": "<Extracted_Chassis_Number>",
"conf": "<Confidence_Level>"
},
"engineNumber": {
"value": "<Extracted_Engine_Number>",
"conf": "<Confidence_Level>"
},
"ownerName": {
"value": "<Owner_Name>",
"conf": "<Confidence_Level>"
},
"relationName": {
"value": "<Relation_Name>",
"conf": "<Confidence_Level>"
},
"model": {
"value": "<Vehicle_Model>",
"conf": "<Confidence_Level>"
},
"vehicleType": {
"value": "<Type_Of_Vehicle>",
"conf": "<Confidence_Level>"
},
"address": {
"value": "<Owner_Address>",
"conf": "<Confidence_Level>"
},
"manufacturer": {
"value": "<Vehicle_Manufacturer>",
"conf": "<Confidence_Level>"
},
"manufacturingDate": {
"value": "<Manufacturing_Date_in_DD-MM-YYYY_Format>",
"conf": "<Confidence_Level>"
}
}
}
],
"metaData": {
"requestId": "<Request_ID>"
}
}
{
"status": "success",
"statusCode": "200",
"result": [
{
"details": {
"type": "other",
"registrationNumber": {
"value": "<Extracted_Registration_Number>",
"conf": "<Confidence_Level>"
},
"registrationDate": {
"value": "<Extracted_Registration_Date>",
"conf": "<Confidence_Level>"
},
"registrationExpiryDate": {
"value": "<Extracted_Registration_Expiry_Date>",
"conf": "<Confidence_Level>"
},
"chassisNumber": {
"value": "<Extracted_Chassis_Number>",
"conf": "<Confidence_Level>"
},
"engineNumber": {
"value": "<Extracted_Engine_Number>",
"conf": "<Confidence_Level>"
},
"ownerName": {
"value": "<Owner_Name>",
"conf": "<Confidence_Level>"
},
"relationName": {
"value": "<Relation_Name>",
"conf": "<Confidence_Level>"
},
"model": {
"value": "<Vehicle_Model>",
"conf": "<Confidence_Level>"
},
"vehicleType": {
"value": "<Type_Of_Vehicle>",
"conf": "<Confidence_Level>"
},
"address": {
"value": "<Owner_Address>",
"conf": "<Confidence_Level>"
},
"manufacturer": {
"value": "<Vehicle_Manufacturer>",
"conf": "<Confidence_Level>"
},
"manufacturingDate": {
"value": "<Manufacturing_Date_in_DD-MM-YYYY_Format>",
"conf": "<Confidence_Level>"
}
}
}
],
"metaData": {
"requestId": "<Request_ID>"
}
}
Success Response Details
| Parameter | Type | Description |
|---|---|---|
| type | string | The type of document processed |
| registrationNumber.value | string | The extracted registration number |
| registrationNumber.conf | string | The confidence level of the extracted registration number, represented as a percentage |
| registrationDate.value | string | The extracted registration date in the format "DD/MM/YYYY" |
| registrationDate.conf | string | The confidence level of the extracted registration date, represented as a percentage |
| registrationExpiryDate.value | string | The extracted registration expiry date in the format "DD/MM/YYYY" |
| registrationExpiryDate.conf | string | The confidence level of the extracted registration expiry date, represented as a percentage |
| chassisNumber.value | string | The extracted chassis number |
| chassisNumber.conf | string | The confidence level of the extracted chassis number, represented as a percentage |
| engineNumber.value | string | The extracted engine number |
| engineNumber.conf | string | The confidence level of the extracted engine number, represented as a percentage |
| ownerName.value | string | The user's name, extracted from the document |
| ownerName.conf | string | The confidence level of the user's name, represented as a percentage |
| relationName.value | string | The user's relative's name, as extracted from the document |
| relationName.conf | string | The confidence level of the extracted relation name, represented as a percentage |
| model.value | string | The extracted vehicle model |
| model.conf | string | The confidence level of the extracted vehicle model, represented as a percentage |
| vehicleType.value | string | The extracted vehicle type |
| vehicleType.conf | string | The confidence level of the extracted vehicle type, represented as a percentage |
| address.value | string | The user's address as extracted from the document |
| address.conf | string | The confidence level of the extracted address, represented as a percentage |
| manufacturer.value | string | The extracted manufacturer |
| manufacturer.conf | string | The confidence level of the extracted manufacturer, represented as a percentage |
| manufacturingDate.value | string | The extracted manufacturing date in the format "DD/MM/YYYY" |
| manufacturingDate.conf | string | The confidence level of the extracted manufacturing date, represented as a percentage |
Error Response Samples
- Invalid Input
- Missing/Invalid credentials
- Input Validation Error- Missing RC Document
- Internal Server Error
{
"message": "Invalid file type for: image",
"statusCode": 400,
"status": "failure"
}
{
"message": "Missing/Invalid credentials",
"statusCode": 401,
"status": "failure"
}
{
"status": "failure",
"result": {
"error": "Document Not Detected"
},
"statusCode": 422,
"metaData": {
"requestId": "<Request_ID>"
}
}
{
"message": "Internal Server Error",
"statusCode": 500,
"status": "failure"
}
Error Response Details
A failure or error response from the module contains a
failure status, with a relavant status code and error message. The following table lists all error responses. | Status Code | Error Message | Error Description |
|---|---|---|
| 400 | Invalid file type for: image | The file type provided is not acceptable for the specified file type |
| 401 | Missing/Invalid credentials | The request is either missing the mandatory appId and appKey combination or has invalid values |
| 422 | Document Not Detected | The request is missing the required RC document or it could not be detected |
| 500 | Internal Server Error | Please check the request headers or contact the HyperVerge team for resolution |